package com.ctbri.JWLetter.bean;

import java.util.Date;

/**
 * 信件实体
 * 
 * @author Hogan
 * 
 */
public class Letter {

	private Integer letterId;
	private String author;
	private String title;
	private String content;
	private Date submitDate;
	private Integer status;
	private Integer category;
	private String categoryName;

	public Integer getLetterId() {
		return letterId;
	}

	public void setLetterId(Integer letterId) {
		this.letterId = letterId;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getSubmitDate() {
		return submitDate;
	}

	public void setSubmitDate(Date submitDate) {
		this.submitDate = submitDate;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getCategory() {
		return category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}

	public String getCategoryName() {
		if (this.category != null) {
			switch (this.category) {
			case 0:
				this.categoryName = "一级信件";
				break;
			case 1:
				this.categoryName = "二级信件";
				break;
			case 2:
				this.categoryName = "三级信件";
				break;
			}
		}
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

}
